Allow setting ring heartbeat timeout to zero to disable timeout check.#4342
Merged
Conversation
566df03 to
16a505e
Compare
This change allows the various ring heartbeat timeouts to be configured with zero, as a means of disabling the timeout. This is expected to be used with a separate enhancement to allow disabling heartbeats. When the heartbeat timeout is disabled, instances will always appear as healthy in the ring. Signed-off-by: Steve Simpson <steve.simpson@grafana.com>
16a505e to
e0bd75e
Compare
stevesg
commented
Jul 6, 2021
stevesg
commented
Jul 7, 2021
pracucci
reviewed
Jul 7, 2021
Contributor
pracucci
left a comment
There was a problem hiding this comment.
This change LGTM. I guess we'll need a follow up PR to also allow disabling heartbeating the ring at all (this PR just checks the timeout). What your plans on this?
About this PR: I would mention it as an experimental feature in docs/configuration/v1-guarantees.md
Contributor
Author
|
The two changes together were very confusing as they spread to so many bits of code in subtly different ways, so the disabling is here: #4344 |
Signed-off-by: Steve Simpson <steve.simpson@grafana.com>
3 tasks
tomwilkie
approved these changes
Jul 8, 2021
bboreham
approved these changes
Jul 8, 2021
Contributor
bboreham
left a comment
There was a problem hiding this comment.
lgtm - I don't think the word "experimental" is necessary but not going to argue.
alvinlin123
pushed a commit
to ac1214/cortex
that referenced
this pull request
Jan 14, 2022
cortexproject#4342) * Allow setting ring heartbeat timeout to zero to disable timeout check. This change allows the various ring heartbeat timeouts to be configured with zero, as a means of disabling the timeout. This is expected to be used with a separate enhancement to allow disabling heartbeats. When the heartbeat timeout is disabled, instances will always appear as healthy in the ring. Signed-off-by: Steve Simpson <steve.simpson@grafana.com> * Review comments. Signed-off-by: Steve Simpson <steve.simpson@grafana.com> Signed-off-by: Alvin Lin <alvinlin@amazon.com>
This was referenced Oct 22, 2025
dimitarvdimitrov
added a commit
to grafana/dskit
that referenced
this pull request
Oct 23, 2025
## What Removes the experimental feature that allowed setting heartbeat period or timeout to 0 to disable them. ## Why This feature was added in cortexproject/cortex#4342 but is not used in production. Removing unused experimental features simplifies the codebase and reduces maintenance burden. ## Changes - Remove "0 = disabled" from flag descriptions for `-*.ring.heartbeat-period` and `-*.ring.heartbeat-timeout` - Add validation to `LifecyclerConfig.Validate()` and `Config.Validate()` to reject zero values - Delete `TestRestartIngester_DisabledHeartbeat_unregister_on_shutdown_false` test - Update tests that were using zero heartbeat values to use non-zero values - Fix metric tests to use recent timestamps that work with non-zero heartbeat timeouts
dimitarvdimitrov
added a commit
to grafana/mimir
that referenced
this pull request
Oct 29, 2025
## What Removes support for setting heartbeat period or timeout to 0 to disable them. ## Why This experimental feature was added in cortexproject/cortex#4342 but is not used in production. Removing unused experimental features simplifies the codebase. ## Changes - Remove "Hash ring" section from experimental features documentation listing the heartbeat disabling flags - Add CHANGELOG entry under `[CHANGE]` scope - Update dskit dependency to include validation changes (via replace directive for now) ## Dependencies This PR depends on grafana/dskit#759 which must be merged first. After that PR is merged, this PR will be updated to: 1. Remove the replace directive 2. Update dskit to the merged commit 3. Update the CHANGELOG with the actual PR number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does:
This change allows the various ring heartbeat timeouts to be configured
with zero, as a means of disabling the timeout. This is expected to be
used with a separate enhancement to allow disabling heartbeats. When the
heartbeat timeout is disabled, instances will always appear as healthy
in the ring.
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]